# Contributor: Patrycja Rosa <alpine@ptrcnull.me>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
# version must be kept in sync with libqalculate
pkgname=qalculate-qt
pkgver=5.0.0
pkgrel=0
pkgdesc="Multi-purpose desktop calculator - Qt version"
url="https://github.com/Qalculate/qalculate-qt"
# qmake is broken on riscv64
arch="all !riscv64"
license="GPL-2.0-or-later"
depends="gnuplot"
makedepends="qt6-qtbase-dev qt6-qttools-dev libqalculate-dev"
subpackages="$pkgname-doc"
source="https://github.com/Qalculate/qalculate-qt/releases/download/v$pkgver/qalculate-qt-$pkgver.tar.gz"
options="!check" # no test suite

build() {
	export CFLAGS="$CFLAGS -flto=auto"
	export CXXFLAGS="$CXXFLAGS -flto=auto"
	qmake6 PREFIX=/usr
	make
}

check() {
	make check
}

package() {
	make INSTALL_ROOT="$pkgdir" install
}

sha512sums="
8ad34952004ab46582642db685242a9922fd63db13256feaf70fdf2ea413f77b49fd4a65a860a19e2db6eea9215d237873da4f59b2e0dc00827fcaca90ac6de7  qalculate-qt-5.0.0.tar.gz
"
